Walkthrough: Custom Formula in Script Mode

Switch to script mode to build custom members in the integrated development environment (IDE). To do this, click the Script Mode button from the Custom Member designer.

Once in script mode, build your custom formula by adding the required functions, hierarchies, and elements, or simply type your formula. If using an MS OLAP or Tabular model, write your formula in MDX; if using an SQL data model, write your formula in PQL.

Follow the example bellow to learn how to build an aggregate custom member:

STEP 1

Open the Numeric functions, and drop the Aggregate formula into the scripting window.

Aggregate()

STEP 2

Replace with All Members from the Member functions.

Aggregate(AllMembers())

STEP 3

Replace with the required hierarchy from the Hierarchies panel.

Aggregate(AllMembers([manufacturers].[Manufacturer])

STEP 4

Test the script, and save it to the CMS. Click Quick Discovery to open the custom member in Discover immediately.